import threading
import time


class MyThread(threading.Thread):
    def run(self):  # 继承后需要重写run方法
        for i in range(5):
            time.sleep(1)
            print('is' + self.name + '@' + str(i))  # self.name保存着当前线程名字


if __name__ == '__main__':
    t = MyThread()
    t.start()
